 <template>
  <el-container>
    <el-main>
      <el-tabs v-model="activeName" @tab-click="handleClick">
        <el-tab-pane
          v-for="(item, index) in tablist"
          :key="index"
          :label="item.title"
          :name="item.name"
        >
          <projects v-if="index == 0" />
          <services v-if="index == 1" />
        </el-tab-pane>
      </el-tabs>
    </el-main>
  </el-container>
</template>
<script>
import projects from './SysBusinessDetectionItemPriceList.vue'
import services from "./DetectionServiceList.vue"

export default {
  name: "PriceSetIndex",
  components: {
    projects,
    services
  },
  data() {
    return {
      tablist: [
        { "title": "检测项目报价", "name": "first" },
        // { "title": "检测服务报价", "name": "second" }
      ],
      activeName: 'first',
      isFirst: true,
      isSecond: true
    };
  },
  mounted: function() {

  },
  methods: {

    handleClick(tab, event) {
      if (tab.name === "first") {
        this.isFirst = true
        this.isSecond = false
        // 加载页签
      } else if (tab.name === "second") {
        this.isFirst = false
        this.isSecond = true
        // 加载页签
      }
    }
  }
};

</script>
<style scoped>
.el-tabs__item {
  font-size: 24px !important;
}
</style>

